package com.sky;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 *   主程序
 */
@SpringBootApplication  //这就是一个主程序,用来启动
@EnableTransactionManagement //开启注解方式的事务管理,就是serviceImpl层的@Transactional注解
@EnableScheduling   //开启任务调度,这个是Spring Task提供的;  可以看"苍穹外卖_day10_1"讲义以及对应的视频
@EnableCaching    //开启缓存注解功能,是spring-cache框架提供的; 就是把对应的菜品分类缓存到redis中,"day07_2.1"讲义
@Slf4j
public class SkyApplication {
    public static void main(String[] args) {
        SpringApplication.run(SkyApplication.class, args);
        log.info("server started");
    }
    
}
